<?xml version="1.0" encoding="UTF-8" ?>
<% include '/common/header.gtpl' %>

<h1>Örtlichkeit erstellen</h1>
<br/>
<a href="/locations">Zurück zur Übersicht</a>
<br/><br/>
<% include '/common/message.gtpl' %>
<form action="/locations/update" method="post">

	<table>
	<thead>
		<tr>
			<th colspan="2">Location bearbeiten</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td class="bold">Name</td>
			<td>
				<input class="breiter" type="text" name="name" value="${request.item.name}" />
			</td>
		</tr>
		<tr>
			<td class="bold">Homepage</td>
			<td>
				<% if(request.item.homepage) { %>
				<input class="breiter" type="text" name="homepage" value="${request.item.homepage}" />
   				<% } else { %>
   				<input class="breiter" type="text" name="homepage"  />
   				<% } %>
   			</td>
		</tr>
		<tr>
			<td class="bold"></td>
			<td>
				<% if(request.item.homepage) { %>
   				<a href="${request.item.homepage}" target="_blank">${request.item.homepage}</a>
   				<% } %>
   			</td>
		</tr>
		<tr>
			<td class="bold">Adresse</td>
			<td>
				<input class="breiter" type="text" name="adresse" value="${request.item.adresse}" />
			</td>
		</tr>
		<tr>
			<td class="bold">Ansprechpartner</td>
			<td>
				<input class="breiter" type="text" name="ansprechpartner" value="${request.item.ansprechpartner}" />
			</td>
		</tr>
		<tr>
			<td class="bold">Telefon</td>
			<td>
				<input class="breiter" type="text" name="telefon" value="${request.item.telefon}" />
			</td>
		</tr>
		<tr>
			<td class="bold">Anmerkung</td>
			<td>
				<textarea class="breiterh" name="anmerkung" >${request.item.anmerkung}</textarea>
			</td>
		</tr>
		<tr>
			<td class="bold">Kostenvoranschlag (€)</td>
			<td>
				<input type="text" name="kostenVA" value="${request.item.kostenVA}" />
			</td>
		</tr>
		<tr>
			<td class="bold">Eindruck</td>
			<td>
				<select name="eindruck">
					<% if(request.item?.eindruck == 0) {%>
						<option selected="selected" value="0">-</option>
					<% } else { %>
						<option value="0">-</option>
					<% }  %>
					<% if(request.item?.eindruck == 1) {%>
						<option selected="selected" value="1">Nicht so gut</option>
					<% } else { %>
						<option value="1">Nicht so gut</option>
					<% }  %>
					<% if(request.item?.eindruck == 2) {%>
						<option selected="selected" value="2">OK</option>
					<% } else { %>
						<option value="2">OK</option>
					<% }  %>
					<% if(request.item?.eindruck == 3) {%>
						<option selected="selected" value="3">Super</option>
					<% } else { %>
						<option value="3">Super</option>
					<% }  %>
				</select>
			</td>
		</tr>
		<tr>
			<td class="bold">Gebucht</td>
			<td>
				<% if(request.item.gebucht) { %>
					<input type="checkbox" name="gebucht" checked="checked" />
				<% } else { %>
					<input type="checkbox" name="gebucht" />
				<% } %>
			</td>
		</tr>
		<tr>
			<td></td>
			<td>
				<input type="hidden" name="key" value="${com.google.appengine.api.datastore.KeyFactory.keyToString(request.item.key)}" />
				<input class="buttonlogin" type="submit" value="Aktualisieren" />
			</td>
		</tr>
	</tbody>
</table>

</form>

<br />

<br/>
<a href="/locations">Zurück zur Übersicht</a>

<% include '/common/footer.gtpl' %>

